package com.github.cyf.upload.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.LocalDateTime;

/**
 * @author chenyifan
 * @create 2025-05-22 17:42
 */
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Data
@ApiModel(value = "上传的文件存储信息")
@TableName("file_info")
public class FileInfo {

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "文件MD5值", required = true)
    private String md5;

    @ApiModelProperty(value = "文件的名称", required = true)
    private String fileName;

    @ApiModelProperty(value = "原始文件名称")
    private String originalName;

    @ApiModelProperty(value = "文件路径", required = true)
    private String filePath;

    @ApiModelProperty(value = "文件大小", required = true)
    private Long fileSize;

    @ApiModelProperty(value = "文件类型", required = true)
    private String fileType;

    @ApiModelProperty(value = "文件创建时间", required = true)
    private LocalDateTime createTime;
}